package com.laicunba.service;

import java.math.BigDecimal;

import com.laicunba.service.SaleService.PayedFinancingTargetParam;

/**
 * 出售(标的)服务
 * 
 * @author why
 *
 */
public interface SaleService {
	class PayedFinancingTargetParam {
		private String certificateId;
		private String payMark;
		private int tN = -1; // t+N, -1代表这里不关心

		public void settN(int tN) {
			this.tN = tN;
		}

		public int gettN() {
			return tN;
		}

		public String getCertificateId() {
			return certificateId;
		}

		public String getPayMark() {
			return payMark;
		}

		public void setCertificateId(String certificateId) {
			this.certificateId = certificateId;
		}

		public void setPayMark(String payMark) {
			this.payMark = payMark;
		}

	}

	/**
	 * 锁定一部分标的
	 * 
	 * @author why
	 *
	 */
	class MakeFinancingTargetBidParam {
		private String certificateId;
		private String financingTargetId;
		private String buyUserId;
		private BigDecimal buyAmount;
		private String summary; // 备注
		private boolean needLockAmount; // 是否需要锁定
		private String payChannel;// 支付通道 fuiou:富友
		private String payName; // 支付者名字
		private String payPid; // 支付者身份证
		private String bankCardNo; // 支付者身行卡号
		private String bankNo; // 支付者银行代码
		private String bankName;// 银行的名字
		private String withdrawType; // 提现类型
		private String channel;
		private String cashCouponId; // 现金券ID
		private boolean isTransferCurrent;
		private String rateIncrCouponId; // 加息券ID
		private String seq;
		public void setSeq(String seq) {
			this.seq = seq;
		}
		public String getSeq() {
			return seq;
		}
		
		public void setRateIncrCouponId(String rateIncrCouponId) {
			this.rateIncrCouponId = rateIncrCouponId;
		}
		public String getRateIncrCouponId() {
			return rateIncrCouponId;
		}
		public void setTransferCurrent(boolean isTransferCurrent) {
			this.isTransferCurrent = isTransferCurrent;
		}
		public boolean isTransferCurrent() {
			return isTransferCurrent;
		}
		public void setCashCouponId(String cashCouponId) {
			this.cashCouponId = cashCouponId;
		}

		public String getCashCouponId() {
			return cashCouponId;
		}

		public void setChannel(String channel) {
			this.channel = channel;
		}

		public String getChannel() {
			return channel;
		}

		public void setWithdrawType(String withdrawType) {
			this.withdrawType = withdrawType;
		}

		public String getWithdrawType() {
			return withdrawType;
		}

		public String getPayChannel() {
			return payChannel;
		}

		public String getPayName() {
			return payName;
		}

		public String getPayPid() {
			return payPid;
		}

		public String getBankCardNo() {
			return bankCardNo;
		}

		public String getBankNo() {
			return bankNo;
		}

		public String getBankName() {
			return bankName;
		}

		public void setPayChannel(String payChannel) {
			this.payChannel = payChannel;
		}

		public void setPayName(String payName) {
			this.payName = payName;
		}

		public void setPayPid(String payPid) {
			this.payPid = payPid;
		}

		public void setBankCardNo(String bankCardNo) {
			this.bankCardNo = bankCardNo;
		}

		public void setBankNo(String bankNo) {
			this.bankNo = bankNo;
		}

		public void setBankName(String bankName) {
			this.bankName = bankName;
		}

		public void setNeedLockAmount(boolean needLockAmount) {
			this.needLockAmount = needLockAmount;
		}

		public boolean isNeedLockAmount() {
			return needLockAmount;
		}

		public String getCertificateId() {
			return certificateId;
		}

		public String getFinancingTargetId() {
			return financingTargetId;
		}

		public String getBuyUserId() {
			return buyUserId;
		}

		public BigDecimal getBuyAmount() {
			return buyAmount;
		}

		public String getSummary() {
			return summary;
		}

		public void setCertificateId(String certificateId) {
			this.certificateId = certificateId;
		}

		public void setFinancingTargetId(String financingTargetId) {
			this.financingTargetId = financingTargetId;
		}

		public void setBuyUserId(String buyUserId) {
			this.buyUserId = buyUserId;
		}

		public void setBuyAmount(BigDecimal buyAmount) {
			this.buyAmount = buyAmount;
		}

		public void setSummary(String summary) {
			this.summary = summary;
		}

	}

	/**
	 * 锁定
	 * 
	 * @param param
	 * @return
	 */
	boolean makeFinancingTargetBid(MakeFinancingTargetBidParam param);

	boolean payedFinancingTarget(PayedFinancingTargetParam payedParam);
	/**
	 * 将购买数据，转入活期账户
	 * @param bid
	 * @return
	 */
	boolean transferBidToCurrentAccount(String bid);
}
